package com.mtsmda.webServices.documentStyle.first.client;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;

import com.mtsmda.webServices.documentStyle.first.WServiceDocumentStyleI;

public class WServiceDocumentStyleClient {

	public static void main(String[] args) throws Exception {
		URL wsdlUrl = new URL("http://localhost:9898/webseriveRPC/hello?wsdl");

		// 1 param from wsdl file "targetNamespace"
		// 2 param "service name"
		QName qName = new QName(
				"http://first.documentStyle.webServices.mtsmda.com/",
				"WServiceDocumentStyleImplService");

		Service service = Service.create(wsdlUrl, qName);

		WServiceDocumentStyleI port = service
				.getPort(WServiceDocumentStyleI.class);
		System.out.println(port.getHi());

	}

}